package com.nuoniu.sibanyun.mapper.erp;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nuoniu.sibanyun.entity.erp.ErpProcessRouteDetail;
import com.nuoniu.sibanyun.entity.vo.ProcessRouteAndPriceDetailVo;
import org.apache.ibatis.annotations.Delete;

import java.util.List;

/**
 * <p>
 * 工艺明细 Mapper 接口
 * </p>
 *
 * @author 小啊刚
 * @since 2020-12-30
 */
public interface ErpProcessRouteDetailMapper extends BaseMapper<ErpProcessRouteDetail> {

    @Delete("delete from mab_process_route_detail where pr_id=#{prId}")
    void deleteByPRId(Long prId);
    /**
     * 通过工艺ID 查询 工艺明细 以及 对应最新的工价
     * @param prId
     * @return
     */
    Page<ProcessRouteAndPriceDetailVo> listProcessRouteAndPriceDetailVo(Page<ProcessRouteAndPriceDetailVo> page, Integer prId, String searchKey, String keyWord, Integer companyId);
    /**
     * 通过工艺明细ID 查询 工艺明细 以及 对应最新的工价
     * @param routeDetailIds
     * @return
     */
    List<ProcessRouteAndPriceDetailVo> listProcessRouteAndPriceDetailVoByRouteDetailIds(String routeDetailIds,Integer companyId);

}